#ifndef CSE168_AASQUARE_H_INCLUDED
#define CSE168_AASQUARE_H_INCLUDED

#include "Vector3.h"
#include "Ray.h"

class AASquare
{
public:
    AASquare(float w, Vector3 c, int axis);
    virtual ~AASquare();

    void setCenter(const Vector3& v)    {m_center = v;}
    void setWidth(const float f)       {m_width = f;}

    const Vector3& center() const       {return m_center;}
    float width() const                {return m_width;}

    virtual bool intersect(HitInfo& result, const Ray& ray);

protected:
    Vector3 m_center;
    float m_width;
    Vector3 m_min;
	Vector3 m_max;
	int m_axis;
};

#endif // CSE168_AASQUARE_H_INCLUDED
